home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Click 1 (Special Issue) / fantasy.iso / Demo The Druid King / DemoMap.pak / SEQUENCES_S01_PAVONIUS_LEAVE.VS < prev    next >
Text File  |  2001-04-11  |  476b  |  25 lines

  1. //void
  2. //Pavonius walks to a certain point and then disappears with his army
  3.  
  4. NamedObj Pavonius;
  5. int x,y;
  6. TPoint pt;
  7. ObjList army;
  8.  
  9.     Pavonius = GetNamedObj("Pavonius");
  10.     x = EnvReadInt("/s01/PavoniusDest.x");
  11.     y = EnvReadInt("/s01/PavoniusDest.y");
  12.     pt.Set(x,y);
  13.  
  14.     while (1) {
  15.         if (Pavonius.obj.pos == pt) break;
  16.         Sleep(500);
  17.     }
  18.  
  19.     army = Pavonius.obj.AsHero.army;
  20.     for (x=0; x < army.Count(); x+=1) {
  21.         army[x].Delete();
  22.     }
  23.     Pavonius.obj.Delete();
  24.  
  25.